package com.zry.traced.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.zry.traced.greendao.entity.FlowRecordInfo;
import com.zry.traced.greendao.entity.OutTreasuryCode;
import com.zry.traced.greendao.entity.PackingOperationInfo;
import com.zry.traced.greendao.entity.PutStorageCode;

import com.zry.traced.greendao.gen.FlowRecordInfoDao;
import com.zry.traced.greendao.gen.OutTreasuryCodeDao;
import com.zry.traced.greendao.gen.PackingOperationInfoDao;
import com.zry.traced.greendao.gen.PutStorageCodeDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig flowRecordInfoDaoConfig;
    private final DaoConfig outTreasuryCodeDaoConfig;
    private final DaoConfig packingOperationInfoDaoConfig;
    private final DaoConfig putStorageCodeDaoConfig;

    private final FlowRecordInfoDao flowRecordInfoDao;
    private final OutTreasuryCodeDao outTreasuryCodeDao;
    private final PackingOperationInfoDao packingOperationInfoDao;
    private final PutStorageCodeDao putStorageCodeDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        flowRecordInfoDaoConfig = daoConfigMap.get(FlowRecordInfoDao.class).clone();
        flowRecordInfoDaoConfig.initIdentityScope(type);

        outTreasuryCodeDaoConfig = daoConfigMap.get(OutTreasuryCodeDao.class).clone();
        outTreasuryCodeDaoConfig.initIdentityScope(type);

        packingOperationInfoDaoConfig = daoConfigMap.get(PackingOperationInfoDao.class).clone();
        packingOperationInfoDaoConfig.initIdentityScope(type);

        putStorageCodeDaoConfig = daoConfigMap.get(PutStorageCodeDao.class).clone();
        putStorageCodeDaoConfig.initIdentityScope(type);

        flowRecordInfoDao = new FlowRecordInfoDao(flowRecordInfoDaoConfig, this);
        outTreasuryCodeDao = new OutTreasuryCodeDao(outTreasuryCodeDaoConfig, this);
        packingOperationInfoDao = new PackingOperationInfoDao(packingOperationInfoDaoConfig, this);
        putStorageCodeDao = new PutStorageCodeDao(putStorageCodeDaoConfig, this);

        registerDao(FlowRecordInfo.class, flowRecordInfoDao);
        registerDao(OutTreasuryCode.class, outTreasuryCodeDao);
        registerDao(PackingOperationInfo.class, packingOperationInfoDao);
        registerDao(PutStorageCode.class, putStorageCodeDao);
    }
    
    public void clear() {
        flowRecordInfoDaoConfig.clearIdentityScope();
        outTreasuryCodeDaoConfig.clearIdentityScope();
        packingOperationInfoDaoConfig.clearIdentityScope();
        putStorageCodeDaoConfig.clearIdentityScope();
    }

    public FlowRecordInfoDao getFlowRecordInfoDao() {
        return flowRecordInfoDao;
    }

    public OutTreasuryCodeDao getOutTreasuryCodeDao() {
        return outTreasuryCodeDao;
    }

    public PackingOperationInfoDao getPackingOperationInfoDao() {
        return packingOperationInfoDao;
    }

    public PutStorageCodeDao getPutStorageCodeDao() {
        return putStorageCodeDao;
    }

}
